Platform Explorer / Nuxeo Platform 2021.7

Component org.nuxeo.ecm.platform.routing.actions

Requirements

Resolution Order

738
The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.

Contributions

XML Source

<?xml version="1.0" encoding="UTF-8"?>

<component name="org.nuxeo.ecm.platform.routing.actions">

  <require>org.nuxeo.ecm.platform.actions</require>

  <extension target="org.nuxeo.ecm.platform.actions.ActionService"
    point="actions">
    <action id="TAB_CONTENT">
      <filter-id>isNotRoute</filter-id>
    </action>

    <action id="TAB_DOCUMENT_ROUTE_CONTENT" link="/incl/tabs/document_route_content.xhtml"
      order="10" label="action.view.content" icon="/icons/file.gif" type="rest_document_link">
      <category>TAB_MANAGE_sub_tab</category>
      <filter-id>isRoute</filter-id>
    </action>

    <action id="TAB_DOCUMENT_ROUTE_ELEMENTS" link="/incl/tabs/document_route_content_elements.xhtml"
      order="10" label="action.view.document.routing.elements" icon="/icons/file.gif"
      type="rest_document_link">
      <category>VIEW_ACTION_LIST</category>
      <filter-id>isRoute</filter-id>
    </action>

    <action id="CANCEL_RELATED_ROUTE" link="#{routingActions.cancelRoute()}"
      order="10" label="label.document.routing.cancel.route">
      <category>ATTACHED_ROUTE_LIST</category>
      <filter-id>hasRelatedRouteStarted</filter-id>
      <filter-id>isEditableRoute</filter-id>
    </action>

    <action id="SAVE_ATTACHED_ROUTE_AS_NEW_INSTANCE" link="#{routingActions.saveRouteAsNewInstance()}"
      order="10" label="label.document.routing.saveAsNew">
      <category>ATTACHED_ROUTE_LIST</category>
      <filter-id>hasRelatedRouteStarted</filter-id>
    </action>

    <!-- TODO this action should not be seen globally
      <action id="SAVE_SELECTED_ROUTE_AS_NEW_INSTANCE"
      link="#{routingActions.saveSelectedRouteAsNewInstance()}" order="50"
      label="label.document.routing.saveAsNew">
      <category>CURRENT_SELECTION_LIST</category>
      <filter id="canDuplicateRouteInstance">
      <rule grant="true">
      <condition>#{routingActions.getCanDuplicateRouteInstance()}
      </condition>
      </rule>
      </filter>
      </action>
    -->

    <!-- TODO this action should not be seen globally
      <action id="SAVE_ROUTE_AS_NEW_INSTANCE" link="#{routingActions.saveRouteAsNewInstance()}"
      order="20" label="label.document.routing.saveAsNew">
      <category>SUBVIEW_UPPER_LIST</category>
      <category>ROUTE_LIST</category>
      <filter-id>isRoute</filter-id>
      </action>
    -->

    <action id="VALIDATE_ROUTE" link="#{routingActions.validateRouteModel()}"
      order="10" label="action.validate.document.routing.model">
      <category>ROUTE_LIST</category>
      <filter-id>isDraftRouteModel</filter-id>
      <filter id="canValidateRoute">
        <rule grant="true">
          <condition>#{routeSecurityChecker.canValidateRoute(currentDocument)}
          </condition>
        </rule>
      </filter>
    </action>

    <!--@deprecated since 5.9.2, use only routes of type 'graph' -->
    <action id="ADD_STEP_BEFORE" label="command.add.routeelement.before"
      link="javascript:document.getElementById('selectRouteElementsTypeForCreationForm:hiddenDocOrder').value = 'before';Richfaces.showModalPanel('selectRouteElementsTypePanel');"
      icon="/icons/add.png">
      <category>ADD_STEP_ACTIONS_LIST</category>
      <filter-id>isNotRunning</filter-id>
      <filter-id>isEditableRoute</filter-id>
      <filter-id>isNotImutableConditionalStructure</filter-id>
    </action>

    <!--@deprecated since 5.9.2, use only routes of type 'graph' -->
    <action id="ADD_STEP_AFTER" label="command.add.routeelement.after"
      link="javascript:document.getElementById('selectRouteElementsTypeForCreationForm:hiddenDocOrder').value = 'after';Richfaces.showModalPanel('selectRouteElementsTypePanel');"
      icon="/icons/add.png">
      <category>ADD_STEP_ACTIONS_LIST</category>
      <filter-id>isEditableRoute</filter-id>
      <filter-id>isNotImutableConditionalStructure</filter-id>
    </action>

    <!--@deprecated since 5.9.2, use only routes of type 'graph' -->
    <action id="ADD_STEP_BETWEEN" label="command.add.routeelement.in"
      link="javascript:document.getElementById('selectRouteElementsTypeForCreationForm:hiddenDocOrder').value = 'in';Richfaces.showModalPanel('selectRouteElementsTypePanel');"
      icon="/icons/add.png">
      <category>ADD_STEP_IN_FORK_ACTIONS_LIST</category>
      <filter-id>isNotRunning</filter-id>
      <filter-id>isEditableRoute</filter-id>
    </action>

    <!--@deprecated since 5.9.2, use only routes of type 'graph' -->
    <action id="REMOVE_STEP" label="command.delete" link="#{routingActions.removeStep}"
      icon="/icons/delete.png">
      <category>REMOVE_STEP_ACTIONS_LIST</category>
      <filter-id>isNotRunning</filter-id>
      <filter-id>isEditableRoute</filter-id>
      <filter-id>isNotImutableConditionalStructure</filter-id>
    </action>

    <!--@deprecated since 5.9.2, use only routes of type 'graph' -->
    <action id="UPDATE_STEP" label="command.edit" link="#{routingActions.editStep}"
      icon="/icons/modify.png">
      <category>EDIT_STEP_ACTIONS_LIST</category>
      <filter-id>isNotRunning</filter-id>
      <filter-id>isEditableRoute</filter-id>
    </action>

    <!--@deprecated since 5.9.2, use only routes of type 'graph' -->
    <action id="MOVE_STEP_UP" label="command.selection.moveUp"
      link="#{routingActions.moveRouteElement('up')}" icon="/icons/routing_move_up.png">
      <category>EDIT_STEP_ACTIONS_LIST</category>
      <filter-id>isNotRunning</filter-id>
      <filter-id>isEditableRoute</filter-id>
      <filter-id>isNotImutableConditionalStructure</filter-id>
    </action>

    <!--@deprecated since 5.9.2, use only routes of type 'graph' -->
    <action id="MOVE_STEP_DOWN" label="command.selection.moveDown"
      link="#{routingActions.moveRouteElement('down')}" icon="/icons/routing_move_down.png">
      <category>EDIT_STEP_ACTIONS_LIST</category>
      <filter-id>isNotRunning</filter-id>
      <filter-id>isEditableRoute</filter-id>
      <filter-id>isNotImutableConditionalStructure</filter-id>
    </action>

    <action id="newDocument">
      <filter-id>create</filter-id>
      <filter-id>isNotDraftRouteModel</filter-id>
    </action>

    <!-- 'Workflow' tab when a document route is running -->
    <!--
      <action id="TAB_ROUTE_WORKFLOW" enabled="true"
      link="/incl/tabs/route_workflow.xhtml" label="action.view.review"
      icon="/icons/file.gif" order="60">
      <category>VIEW_ACTION_LIST</category>
      <filter-id>isRoutable</filter-id>
      <filter id="TAB_ROUTE_WORKFLOW_has_subtabs">
      <rule grant="false">
      <condition>
      #{webActions.getActionsList('TAB_ROUTE_WORKFLOW_sub_tab').isEmpty()}
      </condition>
      </rule>
      </filter>
      </action> -->

    <!-- 'Workflow' sub tab: current route -->
    <action id="TAB_ROUTE_WORKFLOW" enabled="true"
      link="/incl/tabs/current_route.xhtml" order="60" label="action.view.review"
      type="rest_document_link">
      <category>VIEW_ACTION_LIST</category>
      <filter-id>hasRelatedRouteStarted</filter-id>
    </action>

    <action id="reassignTask" order="100" label="label.workflow.task.reassign"
      type="fancybox">
      <category>TASK_ADDITIONAL_ACTIONS</category>
      <properties>
        <property name="include">/incl/tasks/task_reassignment_box.xhtml</property>
        <property name="autoDimensions">true</property>
        <property name="modal">true</property>
        <property name="scrolling">auto</property>
        <property name="ajaxSupport">true</property>
      </properties>
    </action>

    <action id="delegateTask" order="110" label="label.workflow.task.delegation"
      type="fancybox">
      <category>TASK_ADDITIONAL_ACTIONS</category>
      <properties>
        <property name="include">/incl/tasks/task_delegation_box.xhtml</property>
        <property name="autoDimensions">true</property>
        <property name="modal">true</property>
        <property name="scrolling">auto</property>
        <property name="ajaxSupport">true</property>
      </properties>
    </action>

    <action id="current_route_refresh_tasks" link="#{taskActions.resetCache()}"
      order="100" label="label.refresh" icon="/icons/refresh.png">
      <category>CURRENT_ROUTE_PANEL_TOP</category>
      <properties>
        <property name="ajaxSupport">true</property>
        <property name="addForm">true</property>
        <property name="useAjaxForm">true</property>
        <property name="styleClass">button</property>
        <property name="ajaxReRender">
          currentRoutePanelLeft
        </property>
      </properties>
    </action>

  </extension>

  <extension target="org.nuxeo.ecm.platform.actions.ActionService"
    point="filters">

    <filter id="create" append="true">
      <rule grant="true">
        <permission>AddChildren</permission>
        <type>DocumentRoute</type>
        <type>StepFolder</type>
      </rule>
    </filter>

    <filter id="isRoutable">
      <rule grant="true">
        <condition>#{routingActions.isRoutable()}</condition>
      </rule>
    </filter>

    <filter id="isRoute">
      <rule grant="true">
        <type>DocumentRoute</type>
      </rule>
    </filter>

    <filter id="isNotRoute">
      <rule grant="false">
        <type>DocumentRoute</type>
      </rule>
    </filter>

    <filter id="isDraftRouteModel">
      <rule grant="true">
        <condition>
          document.getCurrentLifeCycleState().equals("draft")
        </condition>
        <type>DocumentRoute</type>
      </rule>
    </filter>

    <filter id="isEditableRoute">
      <rule grant="true">
        <condition>#{userSession.administrator}</condition>
      </rule>
      <rule grant="true">
        <group>routeManagers</group>
      </rule>
      <rule grant="true">
        <permission>Manage everything</permission>
      </rule>
    </filter>


    <filter id="isValidatedRouteModel">
      <rule grant="true">
        <condition>
          document.getCurrentLifeCycleState().equals("validated")
        </condition>
        <type>DocumentRoute</type>
      </rule>
    </filter>

    <filter id="noRelatedRouteStarted">
      <rule grant="false">
        <condition>#{routingActions.hasRelatedRoute()}</condition>
      </rule>
    </filter>

    <filter id="hasRelatedRouteStarted">
      <rule grant="true">
        <condition>#{routingActions.hasRelatedRoute()}</condition>
      </rule>
    </filter>

    <filter id="isNotRunning">
      <rule grant="false">
        <condition>
          document.getCurrentLifeCycleState().equals("running")
        </condition>
      </rule>
    </filter>

    <filter id="isNotImutableConditionalStructure">
      <rule grant="false">
        <condition>
          #{documentManager.getParentDocument(document.getRef()).hasFacet("ConditionalStepFolder")}
        </condition>
      </rule>
    </filter>

    <filter id="isNotDraftRouteModel">
      <rule grant="false">
        <condition>
          !(document.getCurrentLifeCycleState().equals("draft"))
        </condition>
        <type>DocumentRoute</type>
        <type>StepFolder</type>
      </rule>
    </filter>

    <filter id="currentUserIsWorkflowInitatior">
      <rule grant="true">
        <condition>currentUser.administrator</condition>
        <condition>
          #{routingActions.getCurrentWorkflowInitiator().equals(currentUser.getName())}
        </condition>
      </rule>
    </filter>

  </extension>
</component>